﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using carShopControl.BLL;

namespace carShopControl.DAL
{
    class LoaiSanPhamDAL
    {
        internal static carShopControl.BLL.LoaiSanPhamBLL GetByID(int p)
        {
            var Loai = from l in CommonDAL.CarShopDB.LoaiSanPhams
                       where l.ID == p
                       select new LoaiSanPhamBLL()
                       {
                           ID = l.ID,
                           MaLoai = l.MaLoai,
                           TenLoai = l.TenLoai
                       };
            return Loai.FirstOrDefault<LoaiSanPhamBLL>();
        }
    }
}
